<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<meta http-equiv="Cache-Control" content="No-Cache">
	<meta http-equiv="Pragma" content="No-Cache">
	<title>운세의 신</title>
	<link rel="stylesheet" type="text/css" href="/css/common.css" />
	<link rel="stylesheet" type="text/css" href="/css/sub.css">
	<link rel="stylesheet" type="text/css" href="/css/result.css"/>
	<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
	<script src="/js/common_result.js" type="text/javascript"></script>
	<script src="/js/snsLinker.js" type="text/javascript"></script>
	<script type="text/javascript" src="https://www.google.com/jsapi"></script>
	<script type="text/javascript">
		google.load("visualization", "1", {packages:["corechart"]});
		google.setOnLoadCallback(drawChart);
		function drawChart() {
			var data = google.visualization.arrayToDataTable([
				  	  ['Year', '평균연봉', '내연봉']
					, ['<?=$user_age?>', <?=$contents['graph']['avg_salary'][0] ?>, <?=$annual_salary ?>]
<?
	$avg_total = 0;
	$my_total = 0;
?>
<?	for ($i=1; $i < count($contents['graph']['my_salary']); $i++) : ?>
					, ['<?=$i+$user_age?>', <?=$contents['graph']['avg_salary'][$i] ?>, <?=$contents['graph']['my_salary'][$i] ?>]
<?
		$avg_total += $contents['graph']['avg_salary'][$i];
		$my_total += $contents['graph']['my_salary'][$i];
?>
<?	endfor ?>
			]);

			var options = {
				title: '나의 금전사주',
				chartArea:{left:100,top:50, width:500, height:150},
				curveType: 'function',
				hAxis: {
					title: '나이,세',  
					titleTextStyle: {
						color: '#FF0000'
					},
					slantedText:false
				},
				vAxis: {
					title: '연봉',
					titleTextStyle: {
						color: '#FF0000'
					},
					format:'#,###만원'
				},
				legend : {
					position: 'bottom'
				}
			};

			var chart = new google.visualization.LineChart(document.getElementById('chart_div'));
			chart.draw(data, options);
		}
		
	</script>
	</head>
	<body>
<input type="hidden" id="result_sex" value="<?=$member['sex']?>" />
<div id="wrap"> 
        <!-- Header -->
        <? include_once $_SERVER['DOCUMENT_ROOT'].'/include/commons/main_header.php'; ?>
        <!--// Header --> 
        
        <!--커튼 데코레이션-->
        <? include_once $_SERVER['DOCUMENT_ROOT'].'/include/commons/drape.php'; ?>
        <!--//커튼 데코레이션--> 
        
        <!--컨텐츠-->
        <div id="content"> 
        <!--휘장-->
        <div class="keybox1"> </div>
        
        <!--왼쪽 컨텐츠-->
        <div class="assistant"> 
                <!--왼쪽 메뉴-->
                <? include_once $_SERVER['DOCUMENT_ROOT'].'/include/commons/inc_lnb.php'; ?>
                <!--// 왼쪽 메뉴--> 
                
                <!--추천테마-->
                <? include_once $_SERVER['DOCUMENT_ROOT'].'/include/static/theme.php'; ?>
                <!--//추천테마--> 
                
                <!--오늘의 추천! 무료운세-->
                <? include_once $_SERVER['DOCUMENT_ROOT'].'/include/static/free.php'; ?>
                <!--//오늘의 추천! 무료운세--> 
                
                <!--회원배너-->
                <? include_once $_SERVER['DOCUMENT_ROOT'].'/include/static/member_join.php'; ?>
                <!--//회원배너--> 
            </div>
        <!--//왼쪽 컨텐츠--> 
        
        <!-- 메인컨텐츠-->
        <div class="cont">
                <div class="money_box"> 
                <!--키비쥬얼-->
                <p><img src="/images/sub/money/result_money_k.png" border="0" usemap="#Map" />
                        <map name="Map" id="Map">
                        <area shape="rect" coords="176,188,340,219" href="#" onClick="window.open ('/static/unse/money_info_pop.php', 'cong_window' , 'toolbar=0, location=0, status=0, menubar=0, scrollbars=1, resizable=1, top=50, left=400, width=730, height=480')" onfocus='this.blur()'>
                    </map>
                    </p>
                <!--//키비쥬얼--> 
                
                <!-- 소개/사주명식/오행분석--> 
                <?php echo $INC_SAJUMS; ?> 
                <!--//자기소개/사주명식/오행분석--> 
                <!--그래프-->
                <div class="money_cont">
                        <dl>
                        <dt><img src="/images/sub/money/table_top1.png" alt="금전운 그래프" /></dt>
                        <dd class="chart"><div id="chart_div" style="width:630px; height:280px; "></div></dd>
                        <dd class="chart_info">
                                <p><img src="/images/sub/money/table_bul.png" alt="정보설명타이틀" /></p>
                                <ul class="infomation">
                                <li>'나의 금전사주'는 <strong>60세</strong>까지의 정보만 보여집니다.</li>
                                <li class="top">해당 직업군의 평균 연봉은 기업 연봉정보 사이트 페이오픈 자료(2011년)를 근거로 합니다.</li>
                                <li class="top">'나의 금전사주'는 <strong>본인의 사주를 기초로 금전운과 연봉을 접목시킨 서비스</strong>로써,<br />
                                        앞으로의 금전 계획을 준비하는데 있어 매우 유용한 정보가 될 것 입니다.</li>
                            </ul>
                            </dd>
                    </dl>
                        <!--금전운 토탈금액-->
                        <div class="chart_total">
                        <ul>
                                <li class="total_01"><img src="/images/sub/money/table_total_01.png" />
                                <p class="tonum">
                                        <?=number_format($avg_total)?>
                                        만원</p>
                            </li>
                                <li class="total_02"><img src="/images/sub/money/table_total_02.png" />
                                <p class="tonum">
                                        <?=number_format($my_total)?>
                                        만원</p>
                            </li>
                            </ul>
                    </div>
                        <!--//금전운 토탈금액-->
                        <p><img src="/images/sub/money/table_bottom.png" /></p>
                    </div>
                <!--//그래프--> 
                <!--총운-->
                <div class="money_cont">
                	<dl>
                    <dt><img src="/images/sub/money/table_top2.png" alt="금전운 총운" /></dt>
                    <dd class="text">
                    <?
					$score = $contents['graph']['score'];
					$key = 0;
					if ($score <= -15) {
						$key = -15;
					} elseif ($score <= -12) {
						$key = -12;
					} elseif ($score <= -9) {
						$key = -9;
					} elseif ($score <= -6) {
						$key = -6;
					} elseif ($score <= -3) {
						$key = -3;
					} elseif ($score < 3) {
						$key = 0;
					} elseif ($score < 6) {
						$key = 3;
					} elseif ($score < 9) {
						$key = 6;
					} elseif ($score < 12) {
						$key = 9;
					} elseif ($score < 15) {
						$key = 12;
					} elseif ($score < 18) {
						$key = 15;
					} else {
						$key = 18;
					}
					
					foreach ($contents['X002'] as $item) {
						if ($item['db_numerical'] == $key) {
							echo $item['db_data'];
						}
					}
					?></dd>
                    </dl>
                     <p><img src="/images/sub/money/table_bottom.png" /></p>
                </div>
               
                <!--//총운-->
                <!--연도별-->
                <div class="money_cont">
                	<dl>
                    <dt><img src="/images/sub/money/table_top3.png" alt="연도별 금전운" /></dt>
                    <dd class="text">
                        
                            <?	for ($i=1; $i < count($contents['graph']['my_salary']); $i++) : ?>
                            <p class="date">
                                    <?=$i+date('Y',time())?>
                                    년 (
                                    <?=$i+$user_age?>
                                    세)</p>
                            <p>
                                    <?=$contents['S042gu'][$i]['data']; ?>
                                </p>
                            <?	endfor ?>
                        
                    </dd>
                    </dl>
                    <p><img src="/images/sub/money/table_bottom.png" /></p>
                </div>
                <!--//연도별-->
               
            </div>
                <!--// Contents --> 
                
                <!--기능 버튼 -->
                <? include_once $_SERVER['DOCUMENT_ROOT'].'/include/unse/button_bar.php'; ?>
                <!--//기능 버튼 --> 
                
                <!--하단컨텐츠-->
                <div class="assistant3"> 
                <!--함께보면좋은 운세-->
                <div class="left">
                        <? include_once $_SERVER['DOCUMENT_ROOT'].'/include/static/together.php'; ?>
                    </div>
                <!--//함께보면좋은 운세--> 
                
                <!--후기게시판-->
                <div class="right"> <?php echo $INC_POSTSCRIPT_LIST ?> </div>
                <!--//후기게시판--> 
            </div>
                <!--//하단컨텐츠--> 
            </div>
        <!--// 메인컨텐츠--> 
        
        <!--서비스배너-->
        <? include_once $_SERVER['DOCUMENT_ROOT'].'/include/static/bn_service.php'; ?>
        <!--//서비스배너--> 
    </div>
        <!--컨텐츠--> 
        
        <!-- Footer -->
        <? include_once $_SERVER['DOCUMENT_ROOT'].'/include/commons/main_footer.php'; ?>
        <!--// Footer --> 
    </div>
</body>
</html>